package com.probox.common.core.enums;

public enum PayMethodEnum {
    //wechat(微信)/balance(余额)/alipay(支付宝)/netbank(网银)

    wechat("wechat","微信"),
    balance("balance","余额"),
    alipay("alipay","支付宝"),
    exchange("exchange","兑换码"),
    cashPayment("cashPayment","现金"),
    netbank("netbank","网银");

    private PayMethodEnum(String k, String v) {
        this.setKey(k);
        this.setValue(v);
    }

    public static String getNameByKey(String key) {
        String rst = "";
        for(PayMethodEnum oe: PayMethodEnum.values()) {
            if (oe.getKey().equals(key)) {
                rst = oe.getValue();
            }
        }
        return rst;
    }

    private String key;
    private String value;

    public String getKey() {
        return key;
    }
    public void setKey(String key) {
        this.key = key;
    }
    public String getValue() {
        return value;
    }
    public void setValue(String value) {
        this.value = value;
    }
}
